
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%@page import="com.tss.util.*"%>
<%@page import="com.jedi.*"%>
<%@page import="com.store.*"%>
<%@page import="java.util.*"%>
<%@page import="java.text.*"%>
<%@include file="../global_var.jsp"%>
<%@include file="../check_login.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
User just_user = (User)session.getAttribute("LoginUser");
if (!just_user.hasPower("10806")) {
	out.println(strNoPowerInfo); 
	return;
}
%>
<html>
<head>
    <base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link href="style/main.css" rel="stylesheet" type="text/css">
<script language="javascript" src="js/common.js"></script>
<script language="javascript">
function clk_artcle_show(article_id) {
	location.href = "know_article_modi.jsp?article_id=" + article_id;
}

function clk_search() {
	var sForm = document.searchForm;
	try {
		var oForm = document.pageForm;
		oForm.category_id.value = sForm.category_id.options[sForm.category_id.selectedIndex].value;
		oForm.keyval.value = sForm.keyval.value;
		oForm.submit();
	}
	catch(ex) {
		//alert(ex.description);
		sForm.submit();
	}
}
</script>
</head>
<body 	leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td style="padding-left:25px;">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td height="31" valign="top" background="images/title_bk_01.gif"
					style="padding-left:10px;padding-top:6px;">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td style="color:#FFFFFF;font-size:13px;"><b>知识库</b>
						-&gt; <b>文章统计</b></td>
					</tr>
				</table>
				</td>
			</tr>
			<tr>
				<td height="100" align="right" valign="top"
					style="padding-top:12px;padding-bottom:10px;padding-right:5px;">
				<table width="100%" border="0" cellpadding="0" cellspacing="1"
					bgcolor="#FFFFFF">
					<tr bgcolor="#858585" align="center">
						<td height="24" width="20%" style="color:#FFFFFF;"><b>用户名</b></td>
						<td width="27%" style="color:#FFFFFF;"><b>EMAIL</b></td>
						<td width="25%" style="color:#FFFFFF;"><b>联系电话</b></td>
						<td width="15%" style="color:#FFFFFF;"><b>所在区域</b></td>
						<td width="13%" style="color:#FFFFFF;"><b>文章数量</b></td>
					</tr>
					<%
			  ArticleMgr articleMgr = new ArticleMgr();
              String sql = "select a.*,b.art_num from userinfo a " +
              	" right outer join " +
              	" (select count(article_id) as art_num,author_id from t_article_info group by author_id) b " +
              	" on a.user_id = b.author_id order by city,art_num desc";
              DbRs rs = articleMgr.getList(sql);
              if (rs != null && rs.size() > 0) {
              	String bgColor[] = {"#EDEDF0","#D7D7DB"};
              	for(int i=0;i<rs.size();i++) {
              %>
					<tr bgcolor="<%=bgColor[i%2]%>" align="center">
						<td height="24" bgcolor="<%=bgColor[i%2]%>">
						  <a href="knowledge_mgt/know_article_stat_detail.jsp?user_id=<%=rs.get(i,"user_id")%>"><%=rs.get(i,"user_name")%></a>
						</td>
						<td align="center"><%=rs.get(i,"email")%></td>
						<td align="center"><%=rs.get(i,"phone")%></td>
						<td align="center"><%=rs.get(i,"city")%></td>
						<td align="right" style="padding-right:5px;"><%=rs.get(i,"art_num")%></td>
					</tr>
					<%}}%>
				</table>
		</td>
	</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
